package com.yanqu.road.logic.bussiness.servercenter;

import com.yanqu.road.entity.activity.ActivityConditionInfo;
import com.yanqu.road.entity.activity.ActivityConfig;
import com.yanqu.road.entity.activity.ActivityInfo;
import com.yanqu.road.entity.config.goods.MallInfo;
import com.yanqu.road.logic.bussiness.DaoHelper;

import java.util.List;
import java.util.Map;

public class ChannelActivityBussiness {

    public static Map<Integer, ActivityInfo> getAllActivityInfoMap(String dbParam, long serverId, int channelActivityTimeZone) {
        return DaoHelper.getTempChannelActivityDaoImpl(dbParam).getAllActivityInfoMap(serverId, channelActivityTimeZone);
    }

    public static boolean isCrossChannelActivity(String dbParam, int activityId) {
        return DaoHelper.getTempChannelActivityDaoImpl(dbParam).isCrossChannelActivity(activityId);
    }

    public static List<Integer> getNoEndCrossChannelActivityId(String dbParam, int channelActivityTimeZone) {
        return DaoHelper.getTempChannelActivityDaoImpl(dbParam).getNoEndCrossChannelActivityId(channelActivityTimeZone);
    }

    public static ActivityInfo getActivityInfoById(String dbParam, int activityId, int channelActivityTimeZone) {
        return DaoHelper.getTempChannelActivityDaoImpl(dbParam).getActivityInfoById(activityId, channelActivityTimeZone);
    }

    public static Map<Integer, List<ActivityConditionInfo>> getActivityConditionInfoMap(String dbParam, List<Integer> activityIdList) {
        return DaoHelper.getTempChannelActivityDaoImpl(dbParam).getActivityConditionInfoMap(activityIdList);
    }

    public static List<ActivityConditionInfo> getActivityConditionInfoList(String dbParam, int activityId, int conditionType) {
        return DaoHelper.getTempChannelActivityDaoImpl(dbParam).getActivityConditionInfoList(activityId, conditionType);
    }

    public static Map<Integer, Map<Integer, MallInfo>> getActivityMallInfoMap(String dbParam, List<Integer> activityIdList) {
        return DaoHelper.getTempChannelActivityDaoImpl(dbParam).getActivityMallInfoMap(activityIdList);
    }

    public static Map<Integer, Map<String, ActivityConfig>> getActivityConfigMap(String dbParam, List<Integer> activityIdList) {
        return DaoHelper.getTempChannelActivityDaoImpl(dbParam).getActivityConfigMap(activityIdList);
    }

    public static Map<Integer, Map<Integer, Integer>> getActivitySwitchMap(String dbParam) {
        return DaoHelper.getTempChannelActivityDaoImpl(dbParam).getActivitySwitchMap();
    }

    public static Map<Integer, ActivityInfo> getRecentWasheActivityInfoMap(String dbParam, int channelId, int channelActivityTimeZone) {
        return DaoHelper.getTempChannelActivityDaoImpl(dbParam).getRecentWasheActivityInfoMap(channelId, channelActivityTimeZone);
    }

    public static Map<Integer, ActivityInfo> getOpeningActivityInfoMapByType(String dbParam, int channelActivityTimeZone,int activityType,int childType) {
        return DaoHelper.getTempChannelActivityDaoImpl(dbParam).getOpeningActivityInfoByActivityType(channelActivityTimeZone,activityType,childType);
    }

}
